package com.proj.mhl.service;

import com.proj.mhl.dao.MenuDAO;
import com.proj.mhl.domain.Menu;

import java.util.List;

public class MenuService {
    MenuDAO menuDAO = new MenuDAO();

    //select all
    public List<Menu> selectMenu() {
        return menuDAO.queryMulti("select * from menu where id >=?", Menu.class, 1);
    }

    //selectSingle
    public Menu selectSingleMenu(int id){
        return menuDAO.querySingle("select * from menu where id = ?",Menu.class,id);
    }


}
